package com.yy.wga.user.service.constant;

import java.util.Random;

/**
 * description
 *
 * @author <a href="mailto:ludezh@dingtalk.com"> ludezh </a>
 * @version 1.0.0   2020/6/6,14:57
 * @since 1.0.0     2020/6/6,14:57
 */
public class RedisConstant {
    /**
     * 随机数对象静态
     */
    public static final Random RANDOM = new Random();
    /**
     * token缓存key，缓存token对应的token：TOKEN:token
     */
    public static final String ACCOUNT_TOKEN = "TOKEN:";
    /**
     * 用户信息缓存key，缓存用户对应的用户信息：ACCOUNT_INFO:用户id
     */
    public static final String ACCOUNT_INFO = "ACCOUNT_INFO:";
    /**
     * 小程序用户登录默认缓存时间为1天 即1440分钟
     *
     * @param
     * @return
     * @author ludezh
     * @date 2020/6/6 15:04
     * @version 1.0.0
     */
    public static final Integer ACCOUNT_TOKEN_EXPIRE_MINUTES = 1440;
    /**
     * 用户id储存其token值缓存过期天数
     *
     * @param
     * @return
     * @author ludezh
     * @date 2020/6/6 15:04
     * @version 1.0.0
     */
    public static final Integer ACCOUNT_ID_EXPIRE_DAY = 4;
    /**
     * 用户id储存其token值缓存过KEY
     *
     * @param
     * @return
     * @author ludezh
     * @date 2020/6/16 15:33
     * @version 1.0.0
     */
    public static final String ACCOUNT_ID_KEY = ":id:";

    /**
     * 微信accessToken前缀 格式 + platform
     */
    public static final String THIRD_WX_ACCOUNT_TOKEN_PREFIX = "THIRD_WX_ACCOUNT_TOKEN:";
    /**
     * 刷新微信accessToken加锁
     */
    public static final String REFRESH_THIRD_WX_ACCESS_TOKEN_LOCK = "THIRD_WX_ACCESS_TOKEN_REFRESH:";
    /**
     * 微信accessToken过期时间 单位秒
     */
    public static final int THIRD_WX_ACCOUNT_TOKEN_EXPIRED_SECOND = 7200;
    /**
     * 微信直播间热数据页码
     */
    public static final String WX_LIVE_ROOM_HOT_PAGE_NO = "WX_LIVE_ROOM_HOT_PAGE_NO";
    /**
     * 微信直播间列表
     */
    public static final String WX_LIVE_ROOM_LIST = "WX_LIVE_ROOM_SET:";
    /**
     * 微信直播间信息
     */
    public static final String WX_LIVE_ROOM_INFO = "WX_LIVE_ROOM_INFO";
    /**
     * 创建直播间白名单
     */
    public static final String WX_LIVE_CREATE_AUTHORIZED_WHITE_LIST = "WX_LIVE_CREATE_AUTHORIZED_WHITE_LIST";

    public static final String MALL_HOME_GS_ZSET_KEY = "MALL_HOME_GS_ZSET";
    public static final int MALL_GS_ZSET_KEY_EXPIRED_DAY = 20;
    public static final String MALL_GS_DETAILS_KEY = "MALL_GS_DETAILS_KEY:";
    public static final int MALL_GS_DETAILS_KEY_EXPIRED_DAY = 7;
    /**
     * 微信支付信息前缀
     */
    public static final String WX_PAY_ORDER_MSG_PREFIX = "WX_PAY_ORDER_MSG:";

    /**
     * 退出登录标记缓存天数  3天
     */
    public static final Integer WX_LOGOUT_FLAG_EXPIRE_TIME = 3;
    /**
     * 修改手机号验证码 MODIFY_PHONE_CODE:应用编码:手机号
     */
    public static String MODIFY_PHONE_CODE = "MODIFY_PHONE_CODE:";
    /**
     * 修改手机号-校验原手机验证码 VERIFY_PHONE_CODE:应用编码:手机号
     */
    public static String VERIFY_PHONE_CODE = "VERIFY_PHONE_CODE:";
}
